package spring.cloud.tasks.client.item_task_processor;

import java.util.HashMap;
import java.util.Map;


public class TaskIdToBeanIdFactory {
    public static final Map<String, String> TaskIdToBeanIdMap = new HashMap<String, String>();

    public static void put(String taskId, String beanId) {
        if (TaskIdToBeanIdMap.containsKey(taskId)) {
            throw new IllegalArgumentException("taskId" + taskId + "重复");
        }
        TaskIdToBeanIdMap.put(taskId, beanId);
    }

    public static String getBeanId(String taskId) {
        return TaskIdToBeanIdMap.get(taskId);
    }
}
